<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<p>注册成功！还有<span id="sp">5</span>秒跳转到登录界面...</p>
<script>
    onload=function () {
        setInterval(go,1000)
    };
    var x=4;
    function go() {

        if (x>=0){
            document.getElementById("sp").innerText=x;
        }else {
            location.href="/login_user";
        }
        x--;
    }
</script>
</body>
</html>